package aidansmeaton.airport;

import aidansmeaton.airport.database.DatabaseHelper;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {
	
private DatabaseHelper db;
	
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        db = DatabaseHelper.getInstance(this);
        
        // Set up home page buttons
        final Button mapViewButton = (Button) findViewById(R.id.mapbutton);
        mapViewButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
				Intent i = new Intent(MainActivity.this,AirportMapActivity.class);
				startActivity(i);
			}
        });
        
        final Button example = (Button) findViewById(R.id.examplebutton);
        example.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
				Intent i = new Intent(MainActivity.this,ExampleActivity.class);
				startActivity(i);
			}
        });
        
    }

}
